clear all

local path0="C:\Dropbox\GeneticsProject (1)\REStat\round_accepted_replication_files\"

set matsize 5500
set more off

cd "`path0'Data\Measures_of_diffusion"


*Importing country codes and country names
use country_code_4.dta, clear
keep if priority==1
sort countrycode
save final_dataset, replace


*******************************************
*Fraction of Population of European Descent
*******************************************

*AJR (2001): fraction of population of European descent in 1900

use maketable1, clear
rename shortnam countrycode

*Making countrycodes compatible
replace countrycode ="GER" if countrycode == "DEU"

sort countrycode
keep countrycode euro1900
merge countrycode using final_dataset
drop _merge

*Replacing European descent variable for countries that we know
replace euro1900 =100 if countrycode == "SCG" | countrycode =="ALB" | countrycode == "IRL" | countrycode == "SVN"
replace euro1900 =0 if countrycode == "KHM"
drop if country=="" 

keep countrycode euro1900
sort countrycode

compress

cd "`path0'workfiles"

save final_diffusion, replace
